let send = document.querySelector("#send");
let tbody = document.querySelector("tbody");
let keywords = document.getElementById("keywords")

send.addEventListener("click", function () {

    ajax("GET", `https://music.0melon0.cn/search?keywords=${keywords.value}`, function (res) {
        res.result.songs.forEach(function (item) {
            tbody.innerHTML += `<tr  id ="${item.id}">
        <td>${item.name}</td>
        <td>${item.artists[0].name}</td>
        <td>${item.album.name}</td>
        <td>${moment(item.duration).format('mm:ss')}</td></tr>`
        })
       
    });

})
